﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Game.Utils;
using Game.Entity.PlatformManager;
using Newtonsoft.Json;
using System.IO;

namespace Game.Web
{
    public class WinningControl
    {
        public string WinningPath { get; set; }
        public WinningControl() {
          //  this.WinningPath = p;
        }

        public Room[] Load()
        { 
            string WinningPath = ApplicationSettings.Get("Winning");
            Room[] RoomsWinning = null;
            using (StreamReader sr = new StreamReader(WinningPath))
            {
                RoomsWinning = JavaScriptConvert.DeserializeObject<Room[]>(sr.ReadToEnd());
            }
            return RoomsWinning;
        }
    }
}